#define STATIC_DDA_CPP_INC_ONCE
#include "static_dda.h"

StaticDda::StaticDda(void) : Dda()
{
	for (int i = 0; i < DDA_ENTRY_NUM; i++) {
		m_classList[i] = new StringList(8, FALSE);
		m_classList[i]->Add(DDA_INSTANCE_CLASS_LISTS[i]);
		m_tagList[i] = new StringList(8, FALSE);
		m_tagList[i]->Add(DDA_INSTANCE_TAG_LISTS[i]);
	}
}

StaticDda::~StaticDda()
{
	for (int i = 0; i < DDA_ENTRY_NUM; i++) {
		delete m_tagList[i];
		delete m_classList[i];
	}
}

BCD StaticDda::GetVer(void)
{
	return(DDA_VER);
}

WORD StaticDda::GetEntryNum(void)
{
	return(DDA_ENTRY_NUM);
}

DdaEntry* StaticDda::GetEntry(WORD i)
{
	return(&DDA_ENTRIES[i]);
}

const char* StaticDda::GetInstanceClassName(WORD entryIndex, WORD instanceIndex)
{
	return(m_classList[entryIndex]->Get(instanceIndex));
}

const char* StaticDda::GetInstanceTag(WORD entryIndex, WORD instanceIndex)
{
	return(m_tagList[entryIndex]->Get(instanceIndex));
}
